package com.xq.action;

import com.xq.pojo.People;
import com.xq.service.PeopleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @author xq
 * @version 1.0
 * @date 2021/4/6 8:48
 * @description 人们控制器
 */
// 此注解表示控制层对象
@Controller
public class PeopleAction {
    // 自动装配PeopleService对象
    @Autowired
    private PeopleService peopleService;

    public void getUserById() {
        People p = peopleService.getPeopleById(1);
        System.out.println(p);
    }
}
